package com.member.common.enums;


import lombok.Getter;

import java.util.Objects;

@Getter
public enum LookStatusEnum {
    NO_LOOK(0, "未带看"),
    LOOK( 10, "已带看"),
    NOT_LOOK( 20, "无需带看"),
    IS_CHAT( 30, "约复聊"),
    CANCEL( 40, "已取消"),
    ;

    private final Integer key;
    private final String desc;

    LookStatusEnum(Integer key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static LookStatusEnum getByKey(Integer _key){
        for (LookStatusEnum item : LookStatusEnum.values()){
            if(Objects.equals(item.getKey(), _key)){
                return item;
            }
        }
        return null;
    }

}
